using UnityEngine;

namespace NodeCanvas.Variables
{
	[AddComponentMenu("")]
	public class ColorData : VariableData
	{
		public Color value;

		public override object objectValue
		{
			get
			{
				return value;
			}
			set
			{
				this.value = (Color)value;
			}
		}

		public override object GetSerialized()
		{
			return new float[4] { value.r, value.g, value.b, value.a };
		}

		public override void SetSerialized(object obj)
		{
			float[] array = obj as float[];
			value = new Color(array[0], array[1], array[2], array[3]);
		}
	}
}
